#include <iostream>
using namespace std;

int main() {
    int auks, bats, coots;

    // double 隐式转换 int
    auks = 19.99 + 11.99;

    // double 强制转换 int, C++旧语法
    bats = (int) 19.99 + (int) 11.99;

    // double 强制转换 int, C++新语法
    coots = int(19.99) + int(11.99);

    cout << "auks = " << auks << endl;
    cout << "bats = " << bats << endl;
    cout << "coots = " << coots << endl;

    char ch = 'Z';
    cout << "The code for " << ch << " is ";

    // char 强制转换 int
    cout << int(ch) << endl;

    cout << "Yes, the code is ";

    // 静态转换
    cout << static_cast<int>(ch) << endl;
}